/* 全局样式 */
:root {
  --quadrant-1-color: #e11d48; /* 红色 - 重要且紧急 */
  --quadrant-2-color: #ca8a04; /* 黄色 - 重要不紧急 */
  --quadrant-3-color: #0891b2; /* 青色 - 紧急不重要 */
  --quadrant-4-color: #4b5563; /* 灰色 - 不重要不紧急 */
  
  /* RGB值用于透明度 */
  --quadrant-1-rgb: 225, 29, 72;
  --quadrant-2-rgb: 202, 138, 4;
  --quadrant-3-rgb: 8, 145, 178;
  --quadrant-4-rgb: 75, 85, 99;
  
  --background-color: #f8fafc;
  --white: #ffffff;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 0.375rem;
  --bg-color: #f8fafc;
  --card-bg-color: #ffffff;
  --text-color: #333333;
  --text-light-color: #6b7280;
  --border-color: #e5e7eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 导航栏样式 */
.navbar {
  background-color: var(--card-bg-color);
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border-color);
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
  padding: 0 1rem;
  max-width: 1280px;
  margin: 0 auto;
}

.navbar-left, .navbar-right {
  display: flex;
  align-items: center;
}

.title {
  margin-left: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
}

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  border: none;
  background-color: transparent;
  color: var(--gray-600);
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
}

.icon-button:hover {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

.icon-button:focus {
  outline: none;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  min-width: 12rem;
  margin-top: 0.5rem;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.dropdown-content.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--gray-700);
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background-color: var(--gray-100);
}

/* 四象限布局 */
.quadrants-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.5rem;
  flex: 1;
}

@media (min-width: 768px) {
  .quadrants-container {
    gap: 1rem;
    padding: 1rem;
  }
}

.quadrant {
  display: flex;
  flex-direction: column;
  background-color: var(--card-bg-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.quadrant-1 {
  border-top: 6px solid var(--quadrant-1-color);
  background-color: rgba(var(--quadrant-1-rgb), 0.05);
}

.quadrant-2 {
  border-top: 6px solid var(--quadrant-2-color);
  background-color: rgba(var(--quadrant-2-rgb), 0.05);
}

.quadrant-3 {
  border-top: 6px solid var(--quadrant-3-color);
  background-color: rgba(var(--quadrant-3-rgb), 0.05);
}

.quadrant-4 {
  border-top: 6px solid var(--quadrant-4-color);
  background-color: rgba(var(--quadrant-4-rgb), 0.05);
}

.quadrant-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.quadrant-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.quadrant-description {
  font-size: 0.75rem;
  color: var(--gray-600);
}

.quadrant-header-right {
  display: flex;
  align-items: center;
}

.task-count {
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--gray-100);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* 添加任务表单 */
.add-task-form {
  display: none;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background-color: var(--gray-50);
  border-radius: var(--border-radius);
}

.add-task-form.show {
  display: block;
}

.task-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.task-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.cancel-button {
  padding: 0.25rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--gray-600);
  font-size: 0.875rem;
  cursor: pointer;
}

.cancel-button:hover {
  color: var(--gray-900);
}

.add-button {
  padding: 0.25rem 0.75rem;
  border: none;
  background-color: #3b82f6;
  color: white;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.add-button:hover {
  background-color: #2563eb;
}

/* 任务容器 */
.tasks-container {
  flex: 1;
  overflow-y: auto;
  min-height: 6.25rem;
}

.task {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease-in-out;
  cursor: grab;
}

.task:hover {
  box-shadow: var(--shadow-md);
}

.task.dragging {
  opacity: 0.5;
}

.task.over {
  border-style: dashed;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.task-header-left {
  display: flex;
  align-items: flex-start;
}

.task-checkbox {
  margin-right: 0.75rem;
  margin-top: 0.25rem;
}

.task-info {
  flex: 1;
}

.task-title {
  word-break: break-word;
}

.task-deadline {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: var(--gray-500);
}

.task-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.625rem;
  font-weight: 500;
}

.priority-high {
  background-color: #fee2e2;
  color: #b91c1c;
}

.priority-medium {
  background-color: #fef3c7;
  color: #b45309;
}

.priority-low {
  background-color: #d1fae5;
  color: #047857;
}

.expand-button {
  color: var(--gray-700);
  border-color: var(--gray-300);
  background-color: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: transform 0.2s, background-color 0.2s, color 0.2s;
}

.expand-button.expanded {
  transform: rotate(180deg);
}

.expand-button:hover {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

.task-description {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  border-top: 1px solid var(--gray-200);
  padding-top: 0.5rem;
}

.task-description.show {
  display: block;
}

/* 任务状态样式 */
.task.completed .task-title {
  text-decoration: line-through;
  color: var(--gray-400);
}

.task.deadline-soon .task-deadline {
  color: var(--quadrant-1-color);
  font-weight: 600;
}

.task.important .task-title {
  font-weight: 700;
}

/* 拖拽相关样式 */
.tasks-container.drag-over {
  background-color: rgba(59, 130, 246, 0.1);
}

/* 任务表单样式 */
.form-title {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.form-group-half {
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.task-textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  min-height: 4rem;
}

.task-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.task-select, .task-date {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  background-color: var(--white);
}

.task-select:focus, .task-date:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* 任务操作按钮 */
.task-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.task-action {
  background-color: var(--gray-100);
  border: 1px solid var(--gray-300);
  cursor: pointer;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border-radius: 50%;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.task-action:hover {
  background-color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.edit-button {
  color: #3b82f6;
  border-color: #93c5fd;
}

.edit-button:hover {
  background-color: #eff6ff;
  color: #2563eb;
}

.delete-button {
  color: var(--quadrant-1-color);
  border-color: #fca5a5;
}

.delete-button:hover {
  background-color: #fee2e2;
  color: #dc2626;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--card-bg-color);
  color: var(--text-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-sm {
  max-width: 400px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gray-500);
  cursor: pointer;
}

.modal-body {
  padding: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid var(--gray-200);
  gap: 0.5rem;
}

.save-button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #3b82f6;
  color: white;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.save-button:hover {
  background-color: #2563eb;
}

.modal-footer .delete-button {
  padding: 0.5rem 1rem;
  background-color: var(--white);
  color: var(--quadrant-1-color);
  border: 1px solid #fca5a5;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-footer .delete-button:hover {
  background-color: #fee2e2;
  color: #dc2626;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* 未分配任务相关样式 */
.modal-lg {
  max-width: 700px;
}

.unassigned-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.add-unassigned-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.add-unassigned-button:hover {
  background-color: #2563eb;
}

.unassigned-tasks-list {
  max-height: 60vh;
  overflow-y: auto;
}

.empty-message {
  padding: 2rem;
  text-align: center;
  color: var(--gray-500);
  font-style: italic;
}

.unassigned-task {
  background-color: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s;
}

.unassigned-task:hover {
  box-shadow: var(--shadow-md);
}

.unassigned-task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.unassigned-task-info {
  flex: 1;
}

.unassigned-task-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--gray-800);
}

.unassigned-task-deadline {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--gray-500);
}

.unassigned-task-description {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.unassigned-task-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.assign-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.assign-button:hover {
  background-color: #2563eb;
}

/* 未分配任务数量标记 */
.count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--quadrant-1-color);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* 删除确认模态框特殊样式 */
#delete-confirm-modal {
  z-index: 110; /* 确保删除确认框显示在其他模态框之上 */
}

/* 编辑任务模态框特殊样式 */
#edit-task-modal {
  z-index: 110; /* 确保编辑模态框显示在其他模态框之上 */
}

/* 分配任务模态框特殊样式 */
#assign-task-modal {
  z-index: 110; /* 确保分配模态框显示在其他模态框之上 */
}

/* 筛选相关样式 */
.filter-section {
  margin-bottom: 1.5rem;
}

.filter-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.filter-option input[type="checkbox"] {
  margin-right: 0.5rem;
}

.filter-reset-button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  background-color: var(--white);
  color: var(--gray-700);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-reset-button:hover {
  background-color: var(--gray-100);
}

.filter-apply-button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #3b82f6;
  color: white;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.filter-apply-button:hover {
  background-color: #2563eb;
}

/* 筛选激活状态 */
.filter-active .icon-button.filter-button {
  color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
}

/* 筛选按钮上的指示器 */
.filter-indicator {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  background-color: #3b82f6;
  border-radius: 50%;
}

/* 主题相关样式 */
/* 蓝色主题 */
body.theme-blue {
  --quadrant-1-color: #3b82f6;  /* 蓝色 */
  --quadrant-2-color: #60a5fa;  /* 浅蓝色 */
  --quadrant-3-color: #1d4ed8;  /* 深蓝色 */
  --quadrant-4-color: #93c5fd;  /* 天蓝色 */
  
  --quadrant-1-rgb: 59, 130, 246;
  --quadrant-2-rgb: 96, 165, 250;
  --quadrant-3-rgb: 29, 78, 216;
  --quadrant-4-rgb: 147, 197, 253;
  
  --bg-color: #eff6ff;
  --card-bg-color: #ffffff;
  --text-color: #1e3a8a;
  --text-light-color: #3b82f6;
  --border-color: #bfdbfe;
}

/* 绿色主题 */
body.theme-green {
  --quadrant-1-color: #10b981;  /* 绿色 */
  --quadrant-2-color: #34d399;  /* 浅绿色 */
  --quadrant-3-color: #059669;  /* 深绿色 */
  --quadrant-4-color: #6ee7b7;  /* 薄荷绿 */
  
  --quadrant-1-rgb: 16, 185, 129;
  --quadrant-2-rgb: 52, 211, 153;
  --quadrant-3-rgb: 5, 150, 105;
  --quadrant-4-rgb: 110, 231, 183;
  
  --bg-color: #ecfdf5;
  --card-bg-color: #ffffff;
  --text-color: #065f46;
  --text-light-color: #10b981;
  --border-color: #a7f3d0;
}

/* 紫色主题 */
body.theme-purple {
  --quadrant-1-color: #8b5cf6;  /* 紫色 */
  --quadrant-2-color: #a78bfa;  /* 浅紫色 */
  --quadrant-3-color: #6d28d9;  /* 深紫色 */
  --quadrant-4-color: #c4b5fd;  /* 薰衣草色 */
  
  --quadrant-1-rgb: 139, 92, 246;
  --quadrant-2-rgb: 167, 139, 250;
  --quadrant-3-rgb: 109, 40, 217;
  --quadrant-4-rgb: 196, 181, 253;
  
  --bg-color: #f5f3ff;
  --card-bg-color: #ffffff;
  --text-color: #4c1d95;
  --text-light-color: #8b5cf6;
  --border-color: #ddd6fe;
}

/* 暗黑主题 */
body.theme-dark {
  --quadrant-1-color: #ef4444;  /* 红色 */
  --quadrant-2-color: #f59e0b;  /* 橙色 */
  --quadrant-3-color: #3b82f6;  /* 蓝色 */
  --quadrant-4-color: #10b981;  /* 绿色 */
  
  --quadrant-1-rgb: 239, 68, 68;
  --quadrant-2-rgb: 245, 158, 11;
  --quadrant-3-rgb: 59, 130, 246;
  --quadrant-4-rgb: 16, 185, 129;
  
  --bg-color: #1f2937;
  --card-bg-color: #374151;
  --text-color: #f9fafb;
  --text-light-color: #d1d5db;
  --border-color: #4b5563;
}

/* 更新全局样式以使用主题变量 */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

.navbar {
  background-color: var(--card-bg-color);
  border-bottom: 1px solid var(--border-color);
}

.quadrant {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
}

.task {
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
}

.modal-content {
  background-color: var(--card-bg-color);
  color: var(--text-color);
}

/* 主题选择模态框样式 */
.theme-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.theme-option {
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s;
}

.theme-option:hover {
  transform: translateY(-5px);
}

.theme-option.active {
  outline: 2px solid #3b82f6;
  border-radius: 0.5rem;
}

.theme-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100px;
  height: 100px;
  margin: 0 auto 0.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.theme-color {
  width: 100%;
  height: 100%;
}

/* 默认主题预览 */
.theme-color-1 { background-color: #e11d48; }
.theme-color-2 { background-color: #ca8a04; }
.theme-color-3 { background-color: #0891b2; }
.theme-color-4 { background-color: #4b5563; }

/* 蓝色主题预览 */
.blue-color-1 { background-color: #3b82f6; }
.blue-color-2 { background-color: #60a5fa; }
.blue-color-3 { background-color: #1d4ed8; }
.blue-color-4 { background-color: #93c5fd; }

/* 绿色主题预览 */
.green-color-1 { background-color: #10b981; }
.green-color-2 { background-color: #34d399; }
.green-color-3 { background-color: #059669; }
.green-color-4 { background-color: #6ee7b7; }

/* 紫色主题预览 */
.purple-color-1 { background-color: #8b5cf6; }
.purple-color-2 { background-color: #a78bfa; }
.purple-color-3 { background-color: #6d28d9; }
.purple-color-4 { background-color: #c4b5fd; }

/* 暗黑主题预览 */
.dark-color-1 { background-color: #ef4444; }
.dark-color-2 { background-color: #f59e0b; }
.dark-color-3 { background-color: #3b82f6; }
.dark-color-4 { background-color: #10b981; }

.theme-name {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  color: var(--text-color);
}

/* 象限标题根据象限颜色显示 */
.quadrant-1 .quadrant-title {
  color: var(--quadrant-1-color);
}

.quadrant-2 .quadrant-title {
  color: var(--quadrant-2-color);
}

.quadrant-3 .quadrant-title {
  color: var(--quadrant-3-color);
}

.quadrant-4 .quadrant-title {
  color: var(--quadrant-4-color);
}

/* 象限悬停效果 */
.quadrant:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-top-width: 8px;
} 